package com.greateamd.timetableasy.server;

import org.apache.log4j.Logger;
import org.springframework.aop.ThrowsAdvice;

import com.greateamd.timetableasy.domain.exceptions.ServerSideException;


public class RPCErrorAdvice implements ThrowsAdvice
{
	private static final Logger log = Logger.getLogger(RPCErrorAdvice.class); //NOPMD
	
	public void afterThrowing(final Throwable t) throws Throwable
	{
		log.error(t, t);
		throw new ServerSideException(t);		
	}
}
